<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="viewport" content="width=device-width,initial-scale=1" />
<title><?=$template['title']; ?></title>
<?=css_asset('reset.css') ?>
<?=css_asset('root.css') ?>
<?=css_asset('grid.css') ?>
<?=css_asset('typography.css') ?>
<?=css_asset('jquery-ui.css') ?>
<?=css_asset('jquery-plugin-base.css') ?>
<?=js_asset('jquery.min.js') ?>
<?=js_asset('jquery-ui-1.8.11.custom.min.js') ?>
<?=js_asset('jquery-settings.js') ?>
<?=js_asset('toogle.js') ?>
<?=js_asset('jquery.tipsy.js') ?>
<?=js_asset('jquery.uniform.min.js') ?>
<?=js_asset('jquery.wysiwyg.js') ?>
<?=js_asset('jquery.tablesorter.min.js') ?>
<?=js_asset('raphael.js') ?>
<?=js_asset('analytics.js') ?>
<?=js_asset('popup.js') ?>
<?=js_asset('fullcalendar.min.js') ?>
<?=js_asset('jquery.prettyPhoto.js') ?>
<?=js_asset('jquery.ui.core.js') ?>
<?=js_asset('jquery.ui.mouse.js') ?>
<?=js_asset('jquery.ui.widget.js') ?>
<?=js_asset('jquery.ui.datepicker.js') ?>
<?=js_asset('jquery.ui.slider.js') ?>
<?=js_asset('jquery.ui.tabs.js') ?>
<?=js_asset('jquery.ui.accordion.js') ?>
<?=js_asset('jquery.dataTables.js') ?>
<script type="text/javascript" src="<?=base_url('tinymce/jscripts/tiny_mce/tiny_mce.js');?>"></script>
<script type="text/javascript">
    var urlajax =  '<?=$this -> config -> item('index_url'); ?>';
    $(document).ajaxStart(function(){
        $('#loading_ajax').show();        
    });
    $(document).ajaxStop(function(){
        $('#loading_ajax').hide();        
    });

    $(document).ready(function() {
        $("a[rel^='prettyPhoto']").prettyPhoto();
    });

    // Function change status of record
    function switchStatus(url_action, idElement, status) {
        $.ajax({
            type: "POST",
            dataType: "json",
            data: "idElement=" + idElement + "&status=" + status,
            url: url_action,
            success: function(data) {
                if(data.status) {
                    location.reload(true);
                }
            }
        });
    }

</script>

<style type="text/css">
    #loading_ajax {
        position: fixed;
        top:10px;
        left:45%;
        padding:20px;
        color:#ff0000;
        background-color: #000;
        opacity: 0.7;
        display:none; 
        z-index:999;
        border-radius: 5px;
    }
</style>

</head>
<?php $theme_admin = base_url().'themes/admin/'; ?>
<body>
<div id="loading_ajax">
    <img style="margin-right:10px; vertical-align:middle" alt="icon" src="<?=themes_admin?>img/loading/5.gif">
    Đang xử lý...
</div>
<div class="wrapper">
	<!-- START HEADER -->
    <div id="header">
    	<!-- logo -->
    	<div class="logo">
            <a href="<?=URL_ADMIN?>"><img src="<?=$theme_admin?>img/logo.png" width="130" height="35" alt="logo"/>
            </a>
        </div>

        <!-- profile box -->
        <div id="profilebox">
        	<a href="#" class="display">
            	<img src="<?php echo $theme_admin?>/img/simple-profile-img.jpg" width="33" height="33" alt="profile"/>	
                <b>Logged in as</b>	<span><?=$this -> session -> userdata('fullname') ?></span>
            </a>

            <div class="profilemenu">
            	<ul>
                	<li><a href="<?=site_url('admin/user/change_password') ?>">Thay mật khẩu</a></li>
                	<li><a href="<?=site_url('admin/logout') ?>">Thoát</a></li>
                </ul>
            </div>
        </div>
        <div class="clear"></div>
    </div>
    <!-- END HEADER -->

    <!-- START MAIN -->
    <div id="main">
        <!-- START SIDEBAR -->
        <div id="sidebar">
            <!-- start searchbox -->
            <div id="searchbox">
            	<div class="in">
               	  <form id="form1" name="form1" method="post" action="">
                  	<input name="textfield" type="text" class="input" id="textfield" onFocus="$(this).attr('class','input-hover')" onBlur="$(this).attr('class','input')"  />
               	  </form>
            	</div>
            </div><!-- end searchbox -->

            <!-- start sidemenu -->
            <div id="sidemenu">
            	<ul>
                	<li class="active" id="home"><a href="<?=site_url('admin/home') ?>"><img src="<?=$theme_admin?>/img/icons/sidemenu/home.png" width="16" height="16" alt="icon"/>Dashboard</a></li>
                    <li id="m_config">
						<a href="<?=site_url('admin/setting') ?>"><img src="<?=$theme_admin?>/img/icons/sidemenu/config.png" width="16" height="16" alt="icon"/>Cấu hình</a>
					</li>

                    <li id="m_product" class="subtitle">
                    	<a href="#" class="action tips-right"><img src="<?=$theme_admin?>/img/icons/sidemenu/cart3.png" width="16" height="16" alt="icon"/>Sản phẩm<img src="<?=$theme_admin?>/img/arrow-down.png" width="7" height="4" alt="arrow" class="arrow"></a>

                    	<ul class="submenu">
                        	<li><a href="<?=site_url('admin/brand') ?>"><img src="<?=$theme_admin?>/img/icons/sidemenu/photo.png" width="16" height="16" alt="icon"/>Nhà cùng cấp</a></li>
                        	<li><a href="<?=site_url('admin/category/group') ?>"><img src="<?=$theme_admin?>/img/icons/sidemenu/image.png" width="16" height="16" alt="icon"/>Nhóm danh mục</span>	</a></li>
                        	<li><a href="<?=site_url('admin/category') ?>"><img src="<?=$theme_admin?>/img/icons/sidemenu/image.png" width="16" height="16" alt="icon"/>Danh mục</span>  </a></li>
                        	<li id="c_product"><a href="<?=site_url('admin/product') ?>"><img src="<?=$theme_admin?>/img/icons/sidemenu/image.png" width="16" height="16" alt="icon"/>Sản phẩm</span>  </a></li>
                        </ul>

                    </li>
                    <li id="m_ct" class="subtitle">
                        <a href="#" class="action tips-right"><img src="<?=$theme_admin?>/img/icons/sidemenu/info.png" width="16" height="16" alt="icon"/>Thuộc tính sản phẩm<img src="<?=$theme_admin?>/img/arrow-down.png" width="7" height="4" alt="arrow" class="arrow"></a>

                        <ul class="submenu">
                            <li><a href="<?=site_url('admin/color') ?>"><img src="<?=$theme_admin?>/img/icons/sidemenu/photo.png" width="16" height="16" alt="icon"/>Màu sắc</a></li>
                            <li><a href="<?=site_url('admin/size') ?>"><img src="<?=$theme_admin?>/img/icons/sidemenu/image.png" width="16" height="16" alt="icon"/>Kích thước</span>    </a></li>
                        </ul>

                    </li>
                    <li id="m_adver"><a href="<?=site_url('admin/adver') ?>"><img src="<?=$theme_admin?>/img/icons/sidemenu/photo.png" width="16" height="16" alt="icon"/>Quảng cáo</a></li>
                   
                </ul>
            </div><!-- end sidemenu -->

        </div><!-- END SIDEBAR -->
        <?php echo $template['body']?>

    </div><!-- END MAIN -->
    
    <!-- START FOOTER -->
    <div id="footer">
    	<div class="left-column">© Copyright 2013 - All rights reserved.</div>
        <div class="right-column">Cuahang247.com</div>
    </div><!-- END FOOTER -->
</div>
</body>
</html>
